import axios from "../../utils/request";

export default {
  getDepartmentList(data) {
    return axios({
      url: '/dev-api/dept/selectAll',
      method: 'get',
      params: data, 
    })
  },

  dSearch(data) {
    return axios({
      url: '/dev-api/dept/dSearch',
      method: 'get',
      params: data,
    })
  },
  searchInstituteUserList(data) {
    return axios({
      url: '/dev-api/instituteUser/selectUser',
      method: 'get',
      params: data,
    })
  },
  //提交就诊申请
  sentHelp(data) {
    return axios({
      url: '/dev-api/mr/commitHelp',
      method: 'post',
      data
    })
  },

  // 修改科室名称
  updateDepartmentInfo(data) {
    return axios({
      url: '/dev-api/dept/updateByDeptId',
      method: 'put',
      data
    })
  },
  
  // 删除科室
  del(data) {
    return axios({
      url: '/dev-api/dept/delete',
      method: 'delete',
      params: data,
    })
  },

  // 单独增加科室
  singleAddDept(data) {
    return axios({
      url: '/dev-api/dept/insert',
      method: 'post',
      data,
    })
  },

  // 管理员身份证列表
  getUserTipsInfo() {
    return axios({
      url: '/dev-api/instituteUser/tipList',
      method: 'get',
    })
  },

  // 批量导入（excel）
  excelAdd(data) {
    return axios({
      url: '/dev-api/dept/insertByExcel',
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },

}